<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CheeseCameraDevice: Cheese Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Cheese Reference Manual">
<link rel="up" href="libcheese.html" title="libcheese">
<link rel="prev" href="CheeseCamera.html" title="CheeseCamera">
<link rel="next" href="CheeseCameraDeviceMonitor.html" title="CheeseCameraDeviceMonitor">
<meta name="generator" content="GTK-Doc V1.29.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#CheeseCameraDevice.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#CheeseCameraDevice.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
                  <a href="#CheeseCameraDevice.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#CheeseCameraDevice.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="libcheese.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="CheeseCamera.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="CheeseCameraDeviceMonitor.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="CheeseCameraDevice"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="CheeseCameraDevice.top_of_page"></a>CheeseCameraDevice</span></h2>
<p>CheeseCameraDevice — Object to represent a video capture device</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="CheeseCameraDevice.stability-level"></a><h2>Stability Level</h2>
<acronym title="Unstable interfaces are experimental or transitional. They are typically used to
give outside developers early access to new or rapidly changing technology, or
to provide an interim solution to a problem where a more general solution is
anticipated. No claims are made about either source or binary compatibility from
one minor release to the next.

The Unstable interface level is a warning that these interfaces are  subject to
change without warning and should not be used in unbundled products.

Given such caveats, customer impact need not be a factor when considering
incompatible changes to an Unstable interface in a major or minor release.
Nonetheless, when such changes are introduced, the changes should still be
mentioned in the release notes for the affected release.
"><span class="acronym">Unstable</span></acronym>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="CheeseCameraDevice.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="returnvalue">CheeseCameraDevice</span></a> *
</td>
<td class="function_name">
<a class="link" href="CheeseCameraDevice.html#cheese-camera-device-new" title="cheese_camera_device_new ()">cheese_camera_device_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="CheeseCameraDevice.html#cheese-camera-device-get-name" title="cheese_camera_device_get_name ()">cheese_camera_device_get_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="CheeseCameraDevice.html#CheeseVideoFormat"><span class="returnvalue">CheeseVideoFormat</span></a> *
</td>
<td class="function_name">
<a class="link" href="CheeseCameraDevice.html#cheese-camera-device-get-best-format" title="cheese_camera_device_get_best_format ()">cheese_camera_device_get_best_format</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GstCaps</span> *
</td>
<td class="function_name">
<a class="link" href="CheeseCameraDevice.html#cheese-camera-device-get-caps-for-format" title="cheese_camera_device_get_caps_for_format ()">cheese_camera_device_get_caps_for_format</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="CheeseCameraDevice.html#cheese-camera-device-get-format-list" title="cheese_camera_device_get_format_list ()">cheese_camera_device_get_format_list</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GstElement</span> *
</td>
<td class="function_name">
<a class="link" href="CheeseCameraDevice.html#cheese-camera-device-get-src" title="cheese_camera_device_get_src ()">cheese_camera_device_get_src</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="CheeseCameraDevice.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type">
<span class="type">GstDevice</span> *</td>
<td class="property_name"><a class="link" href="CheeseCameraDevice.html#CheeseCameraDevice--device" title="The “device” property">device</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type">
<span class="type">gchar</span> *</td>
<td class="property_name"><a class="link" href="CheeseCameraDevice.html#CheeseCameraDevice--name" title="The “name” property">name</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
</tbody>
</table></div>
</div>
<a name="CheeseVideoFormat"></a><div class="refsect1">
<a name="CheeseCameraDevice.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="CheeseCameraDevice.html#CheeseCameraDevice-struct" title="CheeseCameraDevice">CheeseCameraDevice</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="CheeseCameraDevice.html#CheeseVideoFormat-struct" title="CheeseVideoFormat">CheeseVideoFormat</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="CheeseCameraDevice.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/home/david/gnome/share/gtk-doc/html/gobject/gobject-Boxed-Types.html">GBoxed</a>
    <span class="lineart">╰──</span> CheeseVideoFormat
    GObject
    <span class="lineart">╰──</span> CheeseCameraDevice
</pre>
</div>
<div class="refsect1">
<a name="CheeseCameraDevice.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
CheeseCameraDevice implements
 GInitable.</p>
</div>
<div class="refsect1">
<a name="CheeseCameraDevice.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;cheese/cheese-camera-device.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="CheeseCameraDevice.description"></a><h2>Description</h2>
<p><a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a> provides an abstraction of a video capture device.</p>
</div>
<div class="refsect1">
<a name="CheeseCameraDevice.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="cheese-camera-device-new"></a><h3>cheese_camera_device_new ()</h3>
<pre class="programlisting"><a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="returnvalue">CheeseCameraDevice</span></a> *
cheese_camera_device_new (<em class="parameter"><code><span class="type">GstDevice</span> *device</code></em>,
                          <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>Tries to create a new <a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a> with the supplied device. If
construction fails, <code class="literal">NULL</code> is returned, and <em class="parameter"><code>error</code></em>
 is set.</p>
<div class="refsect3">
<a name="cheese-camera-device-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>The GStreamer the device, as supplied by GstDeviceMonitor</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a location to store errors</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cheese-camera-device-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a>, or <code class="literal">NULL</code></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cheese-camera-device-get-name"></a><h3>cheese_camera_device_get_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
cheese_camera_device_get_name (<em class="parameter"><code><a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a> *device</code></em>);</pre>
<p>Get a human-readable name for the device, as reported by udev, which is
suitable for display to a user.</p>
<div class="refsect3">
<a name="cheese-camera-device-get-name.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cheese-camera-device-get-name.returns"></a><h4>Returns</h4>
<p>the human-readable name of the video capture device. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cheese-camera-device-get-best-format"></a><h3>cheese_camera_device_get_best_format ()</h3>
<pre class="programlisting"><a class="link" href="CheeseCameraDevice.html#CheeseVideoFormat"><span class="returnvalue">CheeseVideoFormat</span></a> *
cheese_camera_device_get_best_format (<em class="parameter"><code><a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a> *device</code></em>);</pre>
<p>Get the <a class="link" href="CheeseCameraDevice.html#CheeseVideoFormat"><span class="type">CheeseVideoFormat</span></a> with the highest resolution with a width greater
than 640 pixels and a framerate of greater than 15 FPS for this <em class="parameter"><code>device</code></em>
. If
no such format is found, get the highest available resolution instead.</p>
<div class="refsect3">
<a name="cheese-camera-device-get-best-format.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cheese-camera-device-get-best-format.returns"></a><h4>Returns</h4>
<p>the highest-resolution supported
<a class="link" href="CheeseCameraDevice.html#CheeseVideoFormat"><span class="type">CheeseVideoFormat</span></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cheese-camera-device-get-caps-for-format"></a><h3>cheese_camera_device_get_caps_for_format ()</h3>
<pre class="programlisting"><span class="returnvalue">GstCaps</span> *
cheese_camera_device_get_caps_for_format
                               (<em class="parameter"><code><a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a> *device</code></em>,
                                <em class="parameter"><code><a class="link" href="CheeseCameraDevice.html#CheeseVideoFormat"><span class="type">CheeseVideoFormat</span></a> *format</code></em>);</pre>
<p>Get the <span class="type">GstCaps</span> for the given <em class="parameter"><code>format</code></em>
 on the <em class="parameter"><code>device</code></em>
.</p>
<div class="refsect3">
<a name="cheese-camera-device-get-caps-for-format.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description"><p>a <a class="link" href="CheeseCameraDevice.html#CheeseVideoFormat"><span class="type">CheeseVideoFormat</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cheese-camera-device-get-caps-for-format.returns"></a><h4>Returns</h4>
<p>the <span class="type">GstCaps</span> for the given <em class="parameter"><code>format</code></em>
. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cheese-camera-device-get-format-list"></a><h3>cheese_camera_device_get_format_list ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *
cheese_camera_device_get_format_list (<em class="parameter"><code><a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a> *device</code></em>);</pre>
<p>Get the sorted list of <a class="link" href="CheeseCameraDevice.html#CheeseVideoFormat"><span class="type">CheeseVideoFormat</span></a> that the <em class="parameter"><code>device</code></em>
 supports.</p>
<div class="refsect3">
<a name="cheese-camera-device-get-format-list.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cheese-camera-device-get-format-list.returns"></a><h4>Returns</h4>
<p>list of
<a class="link" href="CheeseCameraDevice.html#CheeseVideoFormat"><span class="type">CheeseVideoFormat</span></a>. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Cheese.VideoFormat][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="cheese-camera-device-get-src"></a><h3>cheese_camera_device_get_src ()</h3>
<pre class="programlisting"><span class="returnvalue">GstElement</span> *
cheese_camera_device_get_src (<em class="parameter"><code><a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a> *device</code></em>);</pre>
<p>Get the source GStreamer element for the <em class="parameter"><code>device</code></em>
.</p>
<div class="refsect3">
<a name="cheese-camera-device-get-src.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>device</p></td>
<td class="parameter_description"><p>a <a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="cheese-camera-device-get-src.returns"></a><h4>Returns</h4>
<p>the source GStreamer element. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="CheeseCameraDevice.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="CheeseCameraDevice-struct"></a><h3>CheeseCameraDevice</h3>
<pre class="programlisting">typedef struct _CheeseCameraDevice CheeseCameraDevice;</pre>
<p>Use the accessor functions below.</p>
</div>
<hr>
<div class="refsect2">
<a name="CheeseVideoFormat-struct"></a><h3>CheeseVideoFormat</h3>
<pre class="programlisting">typedef struct {
  gint width;
  gint height;
} CheeseVideoFormat;
</pre>
<p>A description of the resolution, in pixels, of the format to capture with a
<a class="link" href="CheeseCameraDevice.html" title="CheeseCameraDevice"><span class="type">CheeseCameraDevice</span></a>.</p>
<div class="refsect3">
<a name="CheeseVideoFormat.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><span class="type">gint</span> <em class="structfield"><code><a name="CheeseVideoFormat-struct.width"></a>width</code></em>;</p></td>
<td class="struct_member_description"><p>the width of of the video, in pixels</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><span class="type">gint</span> <em class="structfield"><code><a name="CheeseVideoFormat-struct.height"></a>height</code></em>;</p></td>
<td class="struct_member_description"><p>the height of the video, in pixels</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="CheeseCameraDevice.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="CheeseCameraDevice--device"></a><h3>The <code class="literal">“device”</code> property</h3>
<pre class="programlisting">  “device”                   <span class="type">GstDevice</span> *</pre>
<p>GStreamer device object of the video capture device.</p>
<p>Flags: Read / Write / Construct Only</p>
</div>
<hr>
<div class="refsect2">
<a name="CheeseCameraDevice--name"></a><h3>The <code class="literal">“name”</code> property</h3>
<pre class="programlisting">  “name”                     <span class="type">gchar</span> *</pre>
<p>Human-readable name of the video capture device, for display to the user.</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: NULL</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.29.1</div>
</body>
</html>